package com.probiz.estore.system.service;

import java.io.Serializable;
import java.util.List;

import com.probiz.estore.common.model.system.AppRole;
import com.probiz.estore.core.service.GenericManager;

/**
 * Manager interface for AppRole, responsible for business processing, and communicate between web and persistence layer.
 *
 */
public interface AppRoleManager extends GenericManager<AppRole> {
	/**
	 * get all roles,which id not in roleIds
	 * @param roleIds such as (1,2)
	 * @return List
	 */
	public List getRolesNotInIds(String roleIds);
	
	public boolean getIsRoleNameExist(String roleName);
	
	public AppRole getAdminRole();
	
	public List<AppRole> findAppRoles(Short belongTo);
	
	//取得所有（前台）会员角色
	public List<AppRole> getCustomerRoles();
	
	//取得所有（后台）会员角色
	public List<AppRole> getSystemRoles();
	
	public AppRole getRoleByName(String roleName);
	/**
	 * 表单页获取角色树供选择
	 * @param belongTo 隶属于 
	 * @param exceptRoleId 排除在外的角色ID
	 * @return
	 * 
	 * @see com.probiz.estore.Constants#BELONG_TO_ADMIN
	 */
	public List<AppRole> listRoleTree(Short belongTo, Serializable exceptRoleId);

}
